#define _CRT_SECURE_NO_WARNINGS
#include "slist.h"

void SLTTest()
{
	SLTNode* plist = NULL;
	SLTPushFront(&plist, 1);
	SLTPushFront(&plist, 2);
	SLTPushFront(&plist, 3);
	SLTPushFront(&plist, 4);
	SLTPushFront(&plist, 5);
	SLTPrint(plist);
	SLTPushBack(&plist, 6);
	SLTPrint(plist);
	SLTPushBack(&plist, 7);
	SLTPrint(plist);
	SLTPushBack(&plist, 8);
	SLTPrint(plist);
	SLTPushBack(&plist, 9);
	SLTPrint(plist);

}
void SLTTest1()
{
	SLTNode* plist = NULL;
	SLTPushFront(&plist, 1);
	SLTPushFront(&plist, 2);
	SLTPushFront(&plist, 3);
	SLTPushFront(&plist, 4);
	SLTPrint(plist);
	//SLTPopFront(&plist);
	//SLTPrint(plist);
	//SLTPopFront(&plist);
	//SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);
	/*SLTPopBack(&plist);
	SLTPrint(plist);*/
	/*SLTPopFront(&plist);
	SLTPrint(plist);*/

}

void SLTTest2()
{
	SLTNode* plist = NULL;
	SLTPushFront(&plist, 1);
	SLTPushFront(&plist, 2);
	SLTPushFront(&plist, 3);
	SLTPushFront(&plist, 4);
	SLTPrint(plist);

	SLTNode* pos = SLTFind(plist, 2);
	if (pos)
	{
		SLTErase(&plist, pos);
	}
	SLTPrint(plist);
	SLTDestroy(&plist);
}

int main()
{
	SLTTest2();
	return 0;
}